package com.xh.bussiness.tiku.dao;

import com.xh.bussiness.exam.bean.dto.ExerciseStudentQuestionDto;
import com.xh.bussiness.tiku.bean.dto.QuestionDto;
import com.xh.bussiness.tiku.bean.dto.QuestionTypeCountDto;
import com.xh.bussiness.tiku.bean.request.QuestionQueryRequest;
import com.xh.bussiness.tiku.model.Question;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xh.core.bean.XhPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 试题表 Mapper 接口
 * </p>
 *
 * @author daiwei
 * @since 2019-02-23
 */
public interface QuestionMapper extends BaseMapper<Question> {

    public List queryRandomQuestions(@Param("bean") QuestionQueryRequest bean);

    public Integer queryRandomQuestionsCount(@Param("bean") QuestionQueryRequest bean);

    public XhPage<Map<String,Object>> queryInitData(XhPage page);

    public List queryQuestionOptions(String questionId);

	public XhPage<QuestionDto> queryByPage(@Param("page")XhPage page, @Param("bean") QuestionQueryRequest bean);

    XhPage<QuestionDto> queryQuestionByPage(@Param("page")XhPage page, @Param("bean") QuestionQueryRequest bean);

    List<QuestionTypeCountDto> getQuestionCountGroupByType(QuestionQueryRequest bean);

	Question queryPracticeQuestion(@Param("id")String id);

	List<ExerciseStudentQuestionDto> queryQuestionDetail(@Param("list") List<String> id,@Param("paperId")String paperId);
}
